DISCUSSION
The
ATSUDrawText function renders a range of text at a specified screen location. It uses the same transfer mode and resolution as those set in the graphics port. Text color is taken from the style object and the value in the graphics port is ignored. If the text color was not previously set in the style object, you will get black text, regardless of what was set in the graphics port.
Before drawing the line,
ATSUDrawText turns off any previously set line justification, rotation, width alignment, descent, and ascent values and treats the text as a single line. It then examines the text layout object to make sure that the style runs cover the entire range of text. If there are gaps between style runs,
ATSUDrawText assigns the characters in the gap to the style run following the gap. If there is no style run at the beginning of the range of text,
ATSUDrawText assigns these characters to the first style run it can find. If there no style run at the end of the range of text,
ATSUDrawText assigns the remaining characters to the last style run it can find.
If you want to draw a range of text that spans multiple lines, you should call
ATSUDrawText for each line of text that is being drawn, even if all the lines are in the same text layout object. You should adjust the
iLineOffset parameter to reflect the beginning of each line to be drawn.